/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.rafkind.crawl.generator.monsters;

/**
 * Invidivual monster type
 *
 * @author dave
 */
public class MonsterType {
  private String name;
  private String color;
  private int level;

  private int att;
  private int def;
  private int gold;
  private int xp;

  private Personality personality;

  public Personality getPersonality() {
    return personality;
  }

  public void setPersonality(Personality p) {
    this.personality = p;
  }

  public String getName() {
    return name;
  }

  public void setName(String value) {
    name = value;
  }

  public String getColor() {
    return color;
  }

  public void setColor(String value) {
    color = value;
  }

  public int getLevel() {
    return level;
  }

  public void setLevel(int value) {
    this.level = value;
  }

  public int getAtt() {
    return att;
  }

  public void setAtt(int value) {
    att = value;
  }

  public int getDef() {
    return def;
  }

  public void setDef(int value) {
    def = value;
  }

  public int getGold() {
    return gold;
  }

  public void setGold(int value) {
    gold = value;
  }

  public int getXP() {
    return xp;
  }

  public void setXP(int value) {
    xp = value;
  }

  public static enum Personality {

    PRO_ATTACK("ATTACK", "ANTI_DEFENSE", "HEAL"),
    PRO_DEFENSE("DEFEND", "ANTI_ATTACK", "HEAL"),
    ANTI_ATTACK("PRO_DEFENSE", "DEFEND"),
    ANTI_DEFENSE("PRO_ATTACK", "ATTACK"),
    ATTACK("PRO_ATTACK", "ANTI_DEFENSE"),
    DEFEND("ANTI_DEFENSE", "PRO_ATTACK"),
    HEAL("ATTACK");
    

    private String[] complements;

    Personality(String... c) {
      complements = c;
    }

    public String[] getComplementStrings() {
      return complements;
    }

    public static Personality[] getComplements(Personality p) {
      Personality[] ps = new Personality[p.getComplementStrings().length];
      int i = 0;
      for (String c : p.getComplementStrings()) {
        ps[i++] = Personality.valueOf(c);
      }

      return ps;
    }
  }
}